package com.mayisoftware.mayioa.business.staff.impl.serviceImpl;


import com.mayisoftware.mayioa.business.staff.api.domain.StaffManagerAmendInfo;
import com.mayisoftware.mayioa.business.staff.api.domain.StaffManagerInfo;
import com.mayisoftware.mayioa.business.staff.api.domain.StaffManagerSearchInfo;
import com.mayisoftware.mayioa.business.staff.api.service.IStaffManagerViewService;
import com.mayisoftware.mayioa.business.staff.impl.dao.StaffManagerViewMapper;
import com.mayisoftware.mayioa.common.impl.support.Convert;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service//加载  注入
public class StaffManagerViewServiceImpl  implements IStaffManagerViewService {

    @Autowired
    private StaffManagerViewMapper smvMapper;

    @Override
    public List<StaffManagerInfo> getStaffManagerInfos(StaffManagerSearchInfo searchInfo) {
        return smvMapper.getStaffManagerInfos(searchInfo);
    }

    @Override
    public StaffManagerInfo getStaffManagerInfo(String id) {
        return smvMapper.getStaffManagerInfo(id);
    }

    @Override
    public int isStaffManagerAmendExist(StaffManagerAmendInfo monitorInfo) {
        return smvMapper.isStaffManagerAmendExist(monitorInfo);
    }

    @Override
    public int insertStaffManagerAmend(StaffManagerAmendInfo monitorInfo) {
        return smvMapper.insertStaffManagerAmend(monitorInfo);
    }

    @Override
    public int updateStaffManagerAmend(StaffManagerAmendInfo monitorInfo) {
        return smvMapper.updateStaffManagerAmend(monitorInfo);
    }

    @Override
    public int removeStaffManager(String ids) {
        String [] idnumber = Convert.toStrArray(ids);
        return smvMapper.removeStaffManager(idnumber);

    }

    @Override
    public int removeAllStaffManager(String ids) {
        String [] idnumber = Convert.toStrArray(ids);
        return smvMapper.removeStaffManager(idnumber);

    }


/**
     * 通过角色ID删除角色
     *
     * @param roleId 角色ID
     * @return 结果
     */

/*    @Override
    public boolean removeStaffManager1(String[] roleId)
    {
        return smvMapper.removeStaffManager1(roleId) > 0 ? true : false;
    }*/




}
